<include path="header" /> 
<script src="/image/ui.datepicker.js"></script>
<style>
@import url(/image//ui.datepicker.css); 
</style> 
	<div class="m-title">
    	<ul>
        	<li><a href="/work/index">工作</a></li>
            <li><a href="/work/todo">待办</a></li>
            <li><a href="/work/work">任务</a></li>
            <li class="right"><a href="/work/index">返回 工作</a></li>
            <li></li>
        </ul>
    </div>
    <div class="box">
    	<form action="/work/add" method="post" onsubmit="$('#messageTextarea').html(document.getElementById('editFrame').contentWindow.document.body.innerHTML);">
    	<div class="box-item">
        	<div class="dt"><input type="text" class="subject" name="subject" /></div>
            <span>工作/待办的总结性标题</span>
        </div>
        <div class="box-item">
        	<div class="dt">
            <select name="user_id">
            	<option value="0">#待办</option>
                <? foreach($users as $item){ ?>
                <option value="<?=$item['user_id']?>">@<?=$item['username']?></option>
                <? }?>
            </select>
            </div>
            <span>完成该工作/待办的人，可选择待办或者要完成该工作的同事。</span>
        </div>
        <div class="box-item">
        	<div class="notearea">
                <div class="toolbar">	
                    <span onclick="t('bold')"><img src="/image/bold.png"/></span>
                    <span onclick="t('UnderLine')"><img src="/image/underline.png"/></span>                     
                </div>
		  		<iframe style="width: 100%; height:100" frameborder="1" id="editFrame" src="about:blank">
                </iframe>
                <script>editframe("editFrame");</script>
			</div>
            <textarea id="messageTextarea" name="message" class="hidden"></textarea>
            <span>该工作的具体描述。</span>
        </div>
        <div class="box-item">
        	<div class="dt"><input type="text" name="end_date" id="dateinput" /></div>
            <span>该工作的截至日期，若不填写，则为无限期。</span>
        </div>
        <script>$("#dateinput").datepicker({dateFormat:'yy-mm-dd'});</script>
        <input type="submit" value="确认" class="button" />
        </form>
    </div> 
<include path="footer" /> 